package com.yf.exam.common.enums;

import lombok.Getter;

@Getter
public enum DeleteCodeEnum {

    DELETED(1,"已删除"),
    UN_DELETE(0,"未删除");

    public int code;
    public String desc;


    DeleteCodeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public ResultCodeEnum getByCode(int codeVal) {
        for (ResultCodeEnum resultCodeEnum : ResultCodeEnum.values()) {
            if (resultCodeEnum.code == codeVal) {
                return resultCodeEnum;
            }
        }
        return null;
    }
}
